package com.liuqi.loggers.core;

/**
 * 过滤器默认的匹配规则,
 * 匹配上了: 返回{@link #onMatch}
 * 未匹配上: 返回{@link #onMismatch}
 *
 * @author liuqi
 * @date 2024/11/5 16:32
 **/
public abstract class AbstractMatcherFilter implements Filter {

    protected FilterReply onMatch = FilterReply.ACCEPT;

    protected FilterReply onMismatch = FilterReply.DENY;

    final public void setOnMatch(FilterReply reply) {
        this.onMatch = reply;
    }

    final public void setOnMismatch(FilterReply reply) {
        this.onMismatch = reply;
    }

    final public FilterReply getOnMatch() {
        return onMatch;
    }

    final public FilterReply getOnMismatch() {
        return onMismatch;
    }

}
